<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="C" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/4/14
  Time: 22:40
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>闲置商品列表</title>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/reset.css">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/shiwumain.css">
</head>
<body>


<div class="search_bar clearfix">
    <a href="index.html" class="logo fl"><div style="font-size: 36px ;color: #df4553"><h>闲置商品</h></div></a>
    <div class="search_con fl">
      <form  action="${pageContext.request.contextPath}/product/queryByName" method="post">
        <input type="text" class="input_text fl" name="p_name" placeholder="搜索商品">
        <input type="submit" class="input_btn fr" value="搜索">
        </form>
    </div>

</div>

<div class="navbar_con">
    <div class="navbar clearfix">
        <div class="subnav_con fl">
            <h1>全部商品分类</h1>
            <span></span>
            <ul class="subnav">
                <c:forEach items="${Type}" var="type">
                    <li><a href="${pageContext.request.contextPath}/product/getProductByType1?t_id=${type.t_id}" class="fruit">${type.type}</a></li>
                </c:forEach>
            </ul>
        </div>
        <ul class="navlist fl">
            <li><a href="${pageContext.request.contextPath}/index/ToIndex">首页</a></li>
        </ul>
    </div>
</div>

<div class="breadcrumb">
    <a href="#">商品分类</a>
    <span>></span>
    <a href="#">抗疫宣传</a>
</div>
<div class="main_wrap clearfix">
    <div class="l_wrap fl clearfix">
        <div class="new_goods">
            <h3>抗疫宣传</h3>

        </div>

        <div class="main_wrap clearfix">
            <div class="l_wrap fl clearfix">
                <div class="new_goods">
                    <img src="${pageContext.request.contextPath}/images/fc8a7bb5733b21110749ced88167d4ff.jpg" style="height: 700px;width: 200px">

                </div>
            </div>

    <ul class="goods_type_list clearfix">
        <c:forEach items="${pageInfo.list}" var="list">
        <li>

            <a href="${pageContext.request.contextPath}/product/getProductById?pid=${list.pid}"><img src="${list.photo}"></a>
            <h4><a href="${pageContext.request.contextPath}/product/getProductById?pid=${list.pid}">${list.p_name}</a></h4>
            <div class="operate">
                <span class="prize">￥${list.price}元</span>
            </div>

        </li>
            </c:forEach>
    </ul>
          <C:if test="${sort==1}">
            <div class="pagenation">
                <p style="font-size: 13px ;color: #0C0C0C"> <c:if test="${pageInfo.hasPreviousPage }">
                    <a href="${pageContext.request.contextPath}/product/query?pageNo=${pageInfo.pageNum-1}">上一页</a>
                </c:if>
                    &nbsp;&nbsp;当前 ${pageInfo.pageNum }页,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;总${pageInfo.pages }
                    页,&nbsp;&nbsp;&nbsp;&nbsp;总 ${pageInfo.total } 条记录&nbsp;&nbsp;&nbsp;<c:if test="${pageInfo.hasNextPage }">
                        <a href="${pageContext.request.contextPath}/product/query?pageNo=${pageInfo.pageNum+1}">下一页</a>
                    </c:if>
                </p>

            </div>
        </C:if>
            <C:if test="${sort==2}">
                <div class="pagenation">
                    <p style="font-size: 13px ;color: #0C0C0C"> <c:if test="${pageInfo.hasPreviousPage}">
                        <a href="${pageContext.request.contextPath}/product/queryByName?pageNo=${pageInfo.pageNum-1}&p_name=${p_name}">上一页</a>
                    </c:if>
                        &nbsp;&nbsp;当前 ${pageInfo.pageNum }页,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;总${pageInfo.pages }
                        页,&nbsp;&nbsp;&nbsp;&nbsp;总 ${pageInfo.total } 条记录&nbsp;&nbsp;&nbsp;<c:if test="${pageInfo.hasNextPage }">
                            <a href="${pageContext.request.contextPath}/product/queryByName?pageNo=${pageInfo.pageNum+1}&p_name=${p_name}">下一页</a>
                        </c:if>
                    </p>

                </div>
            </C:if>
            <C:if test="${sort==3}">
                <div class="pagenation">
                    <p style="font-size: 13px ;color: #0C0C0C"> <c:if test="${pageInfo.hasPreviousPage }">
                        <a href="${pageContext.request.contextPath}/product/getProductByType1?pageNo=${pageInfo.pageNum-1}&t_id=${t_id}">上一页</a>
                    </c:if>
                        &nbsp;&nbsp;当前 ${pageInfo.pageNum }页,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;总${pageInfo.pages }
                        页,&nbsp;&nbsp;&nbsp;&nbsp;总 ${pageInfo.total } 条记录&nbsp;&nbsp;&nbsp;<c:if test="${pageInfo.hasNextPage }">
                            <a href="${pageContext.request.contextPath}/product/getProductByType1?pageNo=${pageInfo.pageNum+1}&t_id=${t_id}">下一页</a>
                        </c:if>
                    </p>

                </div>
            </C:if>
        </div>
    </div>
</div>
    <div class="footer">
        <div class="foot_link">
            <a href="#">关于我们</a>
            <span>|</span>
            <a href="#">联系我们</a>
            <span>|</span>
            <a href="#">招聘人才</a>
            <span>|</span>
            <a href="#">友情链接</a>
        </div>
        <p>陕ICP备20007993号 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;校园生活信息网</p>
        <p>如在使用过程中有什么问题，请致电工作人员：18591086232</p>
    </div>

</body>
</html>
